issue 10
(exceptions in ActiveRecord not caught by smart_eval (because...) reported by ghazel
- What steps will reproduce the problem?
1. MyModel.find(:conditions => "non_existant_col = 4")
What is the expected output? What do you see instead?
I expect some sort of error printed by kawaii, as I would get with
'MyModel.find(:conditions => "non_existant_col = 4").count'.
Instead, the action gets an exception and kawaii spins forever waiting for
the response.
What version of the product are you using? On what operating system?
Latest as of today.
This occurs because of the placement of to_ary:
# Perform the query
result = smart_eval(params[:query])
# This is in case we are evaluating an ActiveRecord association. It
won't have
# the too_cute method unless we do this first.
result = result.to_ary if result.kind_of?(Array)
The to_ary is not inside smart_eval, so the exception is not caught.
What steps will reproduce the problem?
1. MyModel.find(:conditions => "non_existant_col = 4")
What is the expected output? What do you see instead?
I expect some sort of error printed by kawaii, as I would get with
'MyModel.find(:conditions => "non_existant_col = 4").count'.
Instead, the action gets an exception and kawaii spins forever waiting for
the response.
What version of the product are you using? On what operating system?
Latest as of today.
This occurs because of the placement of to_ary:
# Perform the query
result = smart_eval(params[:query])
# This is in case we are evaluating an ActiveRecord association. It
won't have
# the too_cute method unless we do this first.
result = result.to_ary if result.kind_of?(Array)
The to_ary is not inside smart_eval, so the exception is not caught.
Aug 10, 2009
issue 9
(grid output a little difficult) reported by ghazel
- It's a little bit difficult to make grid output display columns in the order
you want. An array of hashes with the same keys is turned in to a grid, but
the column order is essentially random.
It would be nice if there were a way to return a two dimensional array,
columns on the first row, data on all following rows. Similarly, it would be
nice if a Hash with only the keys [:type, :columns, :data] returned itself
from too_cute, to allow custom formatting in a snippet.
I made this class to help, but it could be even easier if the base types were
handled differently.
http://gist.github.com/117243
It's a little bit difficult to make grid output display columns in the order
you want. An array of hashes with the same keys is turned in to a grid, but
the column order is essentially random.
It would be nice if there were a way to return a two dimensional array,
columns on the first row, data on all following rows. Similarly, it would be
nice if a Hash with only the keys [:type, :columns, :data] returned itself
from too_cute, to allow custom formatting in a snippet.
I made this class to help, but it could be even easier if the base types were
handled differently.
http://gist.github.com/117243
Aug 06, 2009
issue 8
(HTML escaping) changed by robin.ward
- I've fixed this. The javascript now escapes any html before putting it in a grid.
Status: Verified
Owner: robin.ward
I've fixed this. The javascript now escapes any html before putting it in a grid.
Status: Verified
Owner: robin.ward
Aug 06, 2009
issue 7
(belongs_to and has_one returned ActiveRecord instances don't...) changed by robin.ward
- I've fixed this. The problem was there was no too_cute method for an active record
association proxy.
Status: Verified
Owner: robin.ward
I've fixed this. The problem was there was no too_cute method for an active record
association proxy.
Status: Verified
Owner: robin.ward
Aug 03, 2009
issue 8
(HTML escaping) reported by ghazel
- What steps will reproduce the problem?
1. ["<h1>wtf!</h1>"]
What is the expected output? What do you see instead?
<h1>wtf!</h1>
Instead I see the resulting html.
What version of the product are you using? On what operating system?
Please provide any additional information below.
This is dangerous if user-generated HTML/javascript exist in your database.
Listing these records in Kawaii would execute code in your browser.
Particularly dangerous if the injector knows you're using Kawaii...
What steps will reproduce the problem?
1. ["<h1>wtf!</h1>"]
What is the expected output? What do you see instead?
<h1>wtf!</h1>
Instead I see the resulting html.
What version of the product are you using? On what operating system?
Please provide any additional information below.
This is dangerous if user-generated HTML/javascript exist in your database.
Listing these records in Kawaii would execute code in your browser.
Particularly dangerous if the injector knows you're using Kawaii...
Feb 12, 2009
issue 7
(belongs_to and has_one returned ActiveRecord instances don't...) reported by woodibe
- What steps will reproduce the problem?
1. Say Book belongs_to Bookshelf or Book has_one Bookshelf. Run
Book.first.bookshelf
What is the expected output? What do you see instead?
I expect to see the output formatted like Bookshelf.first, but instead it
is like
#<Bookshelf id: 1, name: "bookshelf1">
What version of the product are you using? On what operating system?
Newest git from github - 7da15f245
Thanks!
ben
What steps will reproduce the problem?
1. Say Book belongs_to Bookshelf or Book has_one Bookshelf. Run
Book.first.bookshelf
What is the expected output? What do you see instead?
I expect to see the output formatted like Bookshelf.first, but instead it
is like
#<Bookshelf id: 1, name: "bookshelf1">
What version of the product are you using? On what operating system?
Newest git from github - 7da15f245
Thanks!
ben
Aug 29, 2008
issue 5
(Load Too Many Records and Firefox Eats All the Memory) reported by donttrustben
- What steps will reproduce the problem?
1. Run a query that returns say 10,000 records from kawaii
What is the expected output? What do you see instead?
Computer freezes up (though still responsive) because firefox uses up all
the memory of the computer. Closing the kawaii tab makes the problem go
away.
What version of the product are you using? On what operating system?
On Hardy using newest github(9c27f2cc7c953bbd6f0d78dcba39e0ef229aecb2) of
kawaii.
Please provide any additional information below.
This is caused by my stupidity - running Table.all into a browser when
there's lots of records in the table is obviously not smart, but it would
be nice if kawaii picked this up for me somehow.
Previous versions had a hard-coded 20 record limit. While I agree that
wasn't flexible enough, might it make sense to allow the user to be
notified that the limit has been reached (using a red colour?) and then
allow the user to set the limit directly from the kawaii window itself?
Thanks,
ben
What steps will reproduce the problem?
1. Run a query that returns say 10,000 records from kawaii
What is the expected output? What do you see instead?
Computer freezes up (though still responsive) because firefox uses up all
the memory of the computer. Closing the kawaii tab makes the problem go
away.
What version of the product are you using? On what operating system?
On Hardy using newest github(9c27f2cc7c953bbd6f0d78dcba39e0ef229aecb2) of
kawaii.
Please provide any additional information below.
This is caused by my stupidity - running Table.all into a browser when
there's lots of records in the table is obviously not smart, but it would
be nice if kawaii picked this up for me somehow.
Previous versions had a hard-coded 20 record limit. While I agree that
wasn't flexible enough, might it make sense to allow the user to be
notified that the limit has been reached (using a red colour?) and then
allow the user to set the limit directly from the kawaii window itself?
Thanks,
ben
Aug 29, 2008
issue 2
(Server fails to startup when mysql gem not installed) Status changed by robin.ward
- No problem, I'm going to close the bug now :)
Status: Verified
No problem, I'm going to close the bug now :)
Status: Verified
Aug 29, 2008
issue 2
(Server fails to startup when mysql gem not installed) commented on by donttrustben
- Hi Robin,
Sorry for taking so long to respond - been busy. Now it appears to work for me
(using commit 9c27f2c), with or without the mysql gem installed.
Thanks,
ben
Hi Robin,
Sorry for taking so long to respond - been busy. Now it appears to work for me
(using commit 9c27f2c), with or without the mysql gem installed.
Thanks,
ben
Aug 25, 2008
issue 2
(Server fails to startup when mysql gem not installed) Status changed by robin.ward
- Okay, I've commited some code that I think should solve the problem. Since I couldn't
reproduce it exactly I don't know for sure, but now it won't call that code if it can't.
If you update, does it work?
Status: Fixed
Okay, I've commited some code that I think should solve the problem. Since I couldn't
reproduce it exactly I don't know for sure, but now it won't call that code if it can't.
If you update, does it work?
Status: Fixed
Aug 21, 2008
issue 4
(Feature Request: Ability to download results from query as a...) reported by donttrustben
- This isn't really an issue - more of a howto, so feel free to mark as
invalid.
Be cool if you could run a query, and then download the results as a
fixture so you could copy/paste that into your testing directory.
To do this you can just add a to_yaml at the end of your query result.
Then copy and paste the result into irb variable and print it out using
puts instead of p to unescape newlines etc.
Be nice if the yaml lines were named, too actually. But eh.
This isn't really an issue - more of a howto, so feel free to mark as
invalid.
Be cool if you could run a query, and then download the results as a
fixture so you could copy/paste that into your testing directory.
To do this you can just add a to_yaml at the end of your query result.
Then copy and paste the result into irb variable and print it out using
puts instead of p to unescape newlines etc.
Be nice if the yaml lines were named, too actually. But eh.
Aug 21, 2008
issue 3
(Copying from Results is Unintuitive) reported by donttrustben
- A small issue (and workaround), but when a list of results is returned in
kawaii, to select multiple cells in the resulting table (so they can be
copied to the clipboard, say), you cannot start holding the click down
over the text.
To copy multiple rows out of a table, start holding the mouse down over
just to the left of the first row (outside the bounding box).
Tried this in Opera 9.2.7 and Firefox 3.0.1, kawaii sha1 commit
386d8d7609517c7e0d686dbc0a6e45911c21841b. Opera is slightly more intuitive
- you can start copying from any space, but still not from the cell
contents directly.
A small issue (and workaround), but when a list of results is returned in
kawaii, to select multiple cells in the resulting table (so they can be
copied to the clipboard, say), you cannot start holding the click down
over the text.
To copy multiple rows out of a table, start holding the mouse down over
just to the left of the first row (outside the bounding box).
Tried this in Opera 9.2.7 and Firefox 3.0.1, kawaii sha1 commit
386d8d7609517c7e0d686dbc0a6e45911c21841b. Opera is slightly more intuitive
- you can start copying from any space, but still not from the cell
contents directly.
Aug 21, 2008
issue 1
(add state) changed by robin.ward
- This is a good idea, but it's more of an enhancement.
I'll assign it to me so I don't forget, and will look into it soon :)
Owner: robin.ward
Labels: Type-Enhancement−Type-Defect
This is a good idea, but it's more of an enhancement.
I'll assign it to me so I don't forget, and will look into it soon :)
Owner: robin.ward
Labels: Type-Enhancement−Type-Defect
Aug 21, 2008
issue 2
(Server fails to startup when mysql gem not installed) Owner changed by robin.ward
- That fix was submitted in order to not include the mysql code before mysql was
initialized.
I think it could be avoided -- I will look into it soon!
Owner: robin.ward
That fix was submitted in order to not include the mysql code before mysql was
initialized.
I think it could be avoided -- I will look into it soon!
Owner: robin.ward
Aug 20, 2008
issue 2
(Server fails to startup when mysql gem not installed) commented on by donttrustben
- Actually, now I've even installed the mysql gem and it doesn't work. Maybe this is a
screw up with my gems beign half apt/half compile from source controlled. Either way
commenting out the require_mysql line in too_cute fixes the problem. Is it really
necessary? If people are using mysql then won't it already be required elsewhere?
Actually, now I've even installed the mysql gem and it doesn't work. Maybe this is a
screw up with my gems beign half apt/half compile from source controlled. Either way
commenting out the require_mysql line in too_cute fixes the problem. Is it really
necessary? If people are using mysql then won't it already be required elsewhere?
Aug 20, 2008
issue 2
(Server fails to startup when mysql gem not installed) reported by donttrustben
- When loading up the script/server, it fails with this output:
$ script/server
=> Booting WEBrick...
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1667:in `method_missing': undefined method `require_mysql' for
ActiveRecord::Base:Class (NoMethodError)
from /home/ben/phd/gnr/lib/too_cute/sql_select.rb:25
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:354:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in `require'
from /home/ben/phd/gnr/config/initializers/kawaii.rb:3
from /home/ben/phd/gnr/config/initializers/kawaii.rb:3:in `each'
...
What version of the product are you using? On what operating system?
Using version http://github.com/eviltrout/kawaii/commit/
386d8d7609517c7e0d686dbc0a6e45911c21841b on Ubuntu Hardy. I do not have
the mysql gem installed, as I mainly use postgres. I had kawaii working
with previous versions though.
Thanks,
ben
When loading up the script/server, it fails with this output:
$ script/server
=> Booting WEBrick...
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
base.rb:1667:in `method_missing': undefined method `require_mysql' for
ActiveRecord::Base:Class (NoMethodError)
from /home/ben/phd/gnr/lib/too_cute/sql_select.rb:25
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:354:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/
dependencies.rb:509:in `require'
from /home/ben/phd/gnr/config/initializers/kawaii.rb:3
from /home/ben/phd/gnr/config/initializers/kawaii.rb:3:in `each'
...
What version of the product are you using? On what operating system?
Using version http://github.com/eviltrout/kawaii/commit/
386d8d7609517c7e0d686dbc0a6e45911c21841b on Ubuntu Hardy. I do not have
the mysql gem installed, as I mainly use postgres. I had kawaii working
with previous versions though.
Thanks,
ben
Aug 13, 2008
issue 1
(add state) reported by jonahfox
- The only critique I have is that you cannot assign variables in Kawaii,
which limits the usefulness of the console.
I hacked it into mine by regexing for variable_name= and assigning that in
to session[variable_name].
For subsequent methods, I had a method_missing that would check the session
keys with that name and return the value.
A feature like this would make Kawaii much more useful (for me at least)
An alternative would be to allow the referencing of the results from other
(named) tabs ?
The only critique I have is that you cannot assign variables in Kawaii,
which limits the usefulness of the console.
I hacked it into mine by regexing for variable_name= and assigning that in
to session[variable_name].
For subsequent methods, I had a method_missing that would check the session
keys with that name and return the value.
A feature like this would make Kawaii much more useful (for me at least)
An alternative would be to allow the referencing of the results from other
(named) tabs ?
Aug 04, 2008
Project kawaii
created by robin.ward
- A pretty web based console for Ruby on Rails applications.
A pretty web based console for Ruby on Rails applications.