Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

622 lines (408 sloc) 21.873 kb
--------------------------------------------------------------------
TAGGED 0.9.1
--------------------------------------------------------------------
Sun Jul 17 21:21:00 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* examples/nitro/run.rb: Mount example under '/'.
* lib/wee/adaptors/nitro.rb: Use Render#controller_name. Fix bugs that
occured when mounted as '/'.
* lib/wee/databases/og/session.rb: Fixed bug. Now works with newest Og
version!
--------------------------------------------------------------------
TAGGED 0.9.0
--------------------------------------------------------------------
Mon Jul 11 23:31:31 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* examples/*: Lots of cleanup. New examples added.
Mon Jul 11 23:18:17 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/components/pager.rb, lib/wee/examples/pager.rb: Moved from examples
into components directory. Slightly modified. Now class Wee::Pager.
* lib/wee/components/login_decoration.rb (Wee::LoginDecoration): Initial
import.
* lib/wee/components/component_dispatcher.rb (Wee::ComponentDispatcher):
Initial creation.
* lib/wee/components.rb: Load new components.
* lib/wee/renderer/html/{brushes,canvas}.rb: Introduced
r.anchor.info(info_url) which can be used to specify the info part of a
URL.
Mon Jul 11 19:29:44 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/renderer/html/{brushes,canvas}.rb: Added #hidden_input.
* lib/wee/adaptors/rails.rb: fixed some bugs. minor refactoring.
* lib/wee/adaptors/nitro.rb, examples/nitro/*: initial creation.
Mon Jul 11 17:02:40 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee.rb (Wee.run): Added method for easy startup of components.
* lib/wee/application.rb: Method Application#insert_new_request_handler
added. Refactored #handle_request a bit.
Mon Jul 11 16:06:49 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/snapshot_ext.rb: refactored. enhanced Hash to be snapshotable.
* lib/wee/session.rb: fixed two bugs I lately introduced during refactoring
* lib/wee/renderer/html/canvas.rb: added r.label
* lib/wee/examples/{pager,counter,editable_counter,calculator}.rb:
moved components from examples directory into Wee base.
* lib/wee.rb: increased version to 0.9.0. Introduced module Wee::Examples.
* lib/wee/skeleton/og/components/main.rb: Minor cleanup.
* lib/wee/databases/og/scaffolder.rb: removed whitespace.
Sat Jul 2 17:48:00 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/adaptors/rails.rb: Integrate Wee components into RubyOnRails.
Very simple example:
##
# In config/environment.rb add:
require 'wee'
require 'wee/adaptors/rails'
require 'components/mycomponent'
##
# In components/mycomponent.rb:
class MyComponent < Wee::Component
# ... your Wee component ...
end
##
# In app/controllers/wee_controller.rb:
class WeeController < ApplicationController
include Wee::Rails::ControllerMixin
register_component "my" do
MyComponent.new
end
end
##
# In app/views/index.rhtml:
<html><body>
<%= show_component 'my' %>
</body></html>
Of course you can render as many components as you like on one page.
You can create components dynamically at runtime with:
make_component component_name, component_object
For example instead of using 'register_component' in the WeeController
shown above, you could write:
def index
make_component('my', MyComponent.new) unless has_component?('my')
# render the view
end
If you don't need the component anymore, drop it:
drop_component 'my'
If you want to map 1:1 a Wee::Component to an ActionController, you can
use:
class WeeController < ApplicationController
include Wee::Rails::ControllerMixin
scaffold_with_component do
MyComponent.new
end
end
At the moment, only pageless mode is possible, so no backtracking is
performed.
NOTE: Your Wee components must be fully marshallable to work with Rails
CGI mode. That means, you are not allowed to use continuations, and no
code blocks (callbacks). For example instead of:
r.anchor.callback { answer true }
You have to write:
r.anchor.callback(:answer, true)
Or more general:
r.anchor.callback(Wee::LiteralMethodCallback.new(self, :answer, true))
* lib/wee/renderer/html/brushes.rb, lib/wee/renderer/html/canvas.rb: Use
method Canvas#build_url instead of Request#build_url. This makes it
independent of the Request class. To use a different URL builder, simply
overwrite Canvas#build_url.
* lib/wee/session.rb, lib/wee/core/context.rb, lib/wee/core_ext.rb:
Wee::RenderingContext now uses #context instead of #request, #response and
#session. This makes it easy to reuse the Context class of other
frameworks like Nitro or Rails.
* lib/wee/components/messagebox.rb: do not use blocks -> fully marshallable
Thu Jun 30 13:23:47 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/session.rb, lib/wee/core/componentrunner.rb, lib/wee/core.rb,
lib/wee/utils/helper.rb, lib/wee/pageless/session.rb: Refactored component
specific stuff (rendering, snapshots, callback processing) out of session
into core class ComponentRunner.
* lib/wee/renderer/html/canvas.rb: fixed bug
Thu Jun 30 12:55:54 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/core/context.rb: forgot to add this file
Thu Jun 30 12:53:59 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/session.rb, lib/wee/context.rb, lib/wee/core/renderingcontext.rb,
lib/wee/core.rb, lib/wee/core_ext.rb, lib/wee.rb: Moved Wee::Context into
core. Wee::Context gets an additional field 'session', and
Wee::RenderingContext inherits from Wee::Context.
Thu Jun 30 12:38:25 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/response.rb: require 'cgi'
Thu Jun 30 12:36:18 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/response.rb (Wee::ErrorResponse#render): correctly format error
responses (patch by Aleksi Niemela)
Thu Jun 30 12:10:36 CEST 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/core.rb, lib/wee/core/idgen.rb, lib/wee/idgen/md5.rb,
lib/wee/idgen/simple.rb: Introduced abstract class Wee::IdGenerator
and subclass Wee::Md5IdGenerator and Wee::SimpleIdGenerator from it.
* lib/wee/core/renderer.rb, lib/wee/core/presenter.rb,
lib/wee/renderer/html/canvas.rb, lib/wee.rb:
Introduce base class of all renderer classes: Wee::Renderer.
Rename Wee::HtmlCanvas to Wee::HtmlCanvasRenderer and inherit from
Wee::Renderer instead of Wee::Canvas. Wee::Canvas is now a mixin
module as has been renamed to Wee::CanvasMixin.
Rename @renderer in Wee::Presenter into @__renderer to avoid
possible problems if this variable is accidently used by a
user-defined component.
* lib/wee/template.rb: Added :local option, with which one can
specify a template file relative to the component file, e.g:
class MyComponent < Wee::Component
template :render_this, :local => 'this.tmpl'
end
Futhermore, added an :r_as_param option, which generates a render
method that takes a renderer object as parameter 'r'.
* lib/wee/renderer/html/brushes.rb, lib/wee/renderer/html/canvas.rb:
Method Brush::SelectListTag#selected takes optionally a block. In
this case, only those elements will be selected, for which the block
evaluates to true. This allows us to use some custom compare
functions instead of the default ones '==' or 'include?'.
Method Brush::SelectListTag#labels also might be passed a block, in
which case the label is the return value of the block called with
the corresponding item as parameter.
Added class Brush::CheckboxTag and corresponding methods
HtmlCanvas#check_box and alias #checkbox.
Method HtmlCanvas#paragraph is no longer a single tag. It can now
contain other tags, e.g. like <p><a .../></p>.
Added method HtmlCanvas#multiline_text, which replaces newline
characters (\n) in the text with <br/> tags.
* lib/wee/page.rb, lib/wee/core/page.rb: Page classes moved into core.
* lib/wee/session.rb: remove require 'wee/page' as this now has been
moved into the core and is automatically required from there.
* lib/wee/context.rb, lib/wee/core/renderingcontext.rb: Moved
RenderingContext class into core.
* lib/wee/core/presenter.rb, lib/wee/core_ext.rb: Moved some stuff
from the Presenter class out of the core.
* lib/wee.rb, lib/wee/core.rb: adapt "require"s to the changed
situation.
* lib/wee/session.rb lib/wee/pageless/session.rb: renamed method
#invoke_callbacks into #process_callbacks and refactored that method a
lot.
* lib/wee/core/presenter.rb, lib/wee/session.rb: removed
throwing of :wee_send_response, instead use
:wee_abort_callback_processing
* lib/wee/core/component.rb, lib/wee/continuation/core/component.rb,
lib/wee/session.rb: renamed :wee_back_to_session into
:wee_abort_callback_processing.
* lib/wee/core/component.rb: Reverted commit from
Thu Mar 3 12:11:05 CET 2005. Removed method Component#parent,
modified method #add_child.
* lib/wee/skeleton/og/conf/db.rb: Upgrade to run under newer Og version.
Sun May 22 18:10:27 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/continuation/session.rb: Fixed a bug. Callbacks were invoked
twice, due to a super() call was calling the "wrong" super-method,
which did the same as the calling method (the right super-method would
have been super.super(), but this is actually not possible in Ruby
without renaming).
Wed Apr 6 19:17:47 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/session.rb: introduced live_update callbacks, which are special
action callbacks that are processed after any action callback.
* lib/wee/renderer/html/canvas.rb, lib/wee/renderer/html/brushes.rb:
- You can now use #value of textarea fields instead of #with.
- Implemented form.onsubmit_update method
Tue Apr 5 21:53:55 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/renderer/html/canvas.rb, lib/wee/renderer/html/brushes.rb,
examples/radio.rb: Added support for radio buttons.
(methods r.new_radio_group and r.radio_button)
--------------------------------------------------------------------
TAGGED 0.8.0
--------------------------------------------------------------------
Mon Apr 4 18:45:28 CET 2005 Michael Neumann <mneumann@ntecs.de>
* examples/ajax/ajax.rb, examples/ajax/ajax.js,
lib/wee/core/presenter.rb, lib/wee/renderer/html/brushes.rb: Added minimal
Ajax update support.
Mon Apr 4 14:32:34 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/abstractsession.rb, lib/wee/session.rb,
lib/wee/pageless/session.rb, examples/live-update.rb: refactored
Session classes.
* lib/wee/core/presenter.rb: added send_response method, to send a
premature response.
Mon Apr 4 13:03:08 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/pageless/session.rb, lib/wee/pageless/application.rb: Remove
dependency of WEBrick::Cookie, use CGI::Cookie instead.
* lib/wee/adaptors/fastcgi.rb: Added preliminary FastCGI adaptor
(does not work yet with Pageless applications).
* lib/wee/adaptors/webrick.rb: reordered line
Sun Apr 3 13:24:04 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/adaptors/webrick.rb: doc fix
Sun Apr 3 13:11:07 CET 2005 Michael Neumann <mneumann@ntecs.de>
* lib/wee/core/presenter.rb, lib/wee/core/component.rb,
lib/wee/core/decoration.rb, lib/wee/session.rb,
lib/wee/pageless/session.rb, examples/window.rb, README:
Fixed a bug in processing the callbacks. It was not guaranteed that
all input callbacks are invoked before the final action callback.
This is now guaranteed! I've introduced two separate tree traversals
of process_callbacks to make this work. As a side effect, this also
has removed the dependency of Presenter/Component/Decoration classes
from the CallbackStream class. Instead of a CallbackStream, a code
block is now passed through the
process_callbacks/process_callbacks_chain traversal. The Session
class specifies how to invoke the callbacks.
Thu Mar 3 12:31:15 CET 2005 Michael Neumann <mneumann@ntecs.de>
* wee/session.rb, wee/pageless/session.rb: new methods
pre_respond_hook, post_callbacks_hook, especially to make pretty-URLs
as suggested by Joao Pedrosa working.
Thu Mar 3 12:11:05 CET 2005 Michael Neumann <mneumann@ntecs.de>
* wee/response.rb (Wee::Response): Use the passed mime_type as
content-type (bug fix).
* wee/request.rb: Made 'info' attribute writeable.
* wee/core/callback.rb: Added reader method for 'obj'
* wee/core/component.rb: Added #parent method, to retrieve the parent
component from a child if existent. The parent attribute will be set
during #add_child.
Thu Mar 3 11:38:21 CET 2005 Michael Neumann <mneumann@ntecs.de>
* wee/application.rb, wee/pageless/application.rb
(request_handler_expired): Forward to an URL that includes the info
part but neither the request_handler_id nor the page_id.
Sat Feb 26 17:12:35 CET 2005 Michael Neumann <mneumann@ntecs.de>
* wee/request.rb, test/test_request.rb, wee/pageless/request.rb,
wee/session.rb, wee/pageless/session.rb,
wee/renderer/html/canvas.rb, wee/renderer/html/brushes.rb:
- request delimeter changed to /___/ (looks nicer)
- refactored Request#build_url, which now takes a hash and
remembers already specified values
- A Request knows now itself whether it's a action or a render
request.
- added Request#info attribute. This is a part of the URL that you
can use for your own purposes. It is remembered across requests
unless you overwrite its value.
Sat Feb 26 14:22:34 CET 2005 Michael Neumann <mneumann@ntecs.de>
* wee/core/presenter.rb, wee/session.rb, wee/application.rb: renamed @properties to @__properties
* wee/core/component.rb: rename @children to @__children
* wee/core/component.rb, wee/core/valueholder.rb: rename @decoration
to @__decoration
--------------------------------------------------------------------
TAGGED 0.7.0
--------------------------------------------------------------------
Tue Feb 1 19:58:08 CET 2005 Michael Neumann <mneumann@ntecs.de>
* SelectListTag (r.select_list): NON-backwards-compatible change!!!
If it's NOT a multiple select list, then the callback is called
with the choosen value (instead of an array of one element). Method
#selected requires a single value in the same way. No changes if it's
a multiple-select list!
* minor refactoring of OgScaffolder (added support for Date type).
--------------------------------------------------------------------
TAGGED 0.6.0
--------------------------------------------------------------------
Sat Jan 29 19:06:12 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Added ERB-templating. Example:
# file: ~/components/main.rb
class Test < Wee::Component
# use template '~/components/main.tpl'
template :render
# use template '~/components/main.tpl-buttons'
template :render_buttons
end
This allows you to use ERB-templates instead of the render_XXX
methods. You can also call render_XXX methods from ERB, back and
forth. The template file is relative to the file from which the
'template :symbol' call is executed. The template method optionally
takes the two hash-parameters :file and :property.
* Added "Pageless" mode. In pageless mode, the URL displayed in your
browser always looks like "/app". The session id is stored as cookie
and there is no page_id, hence "pageless" mode. No backtracking is
performed! Example:
require 'wee/pageless'
app = Wee::Utils.app_for(YourMainComponent,
:session => Wee::PagelessSession,
:application => Wee::PagelessApplication)
Wee::WEBrickAdaptor.
request_class(Wee::PagelessRequest).
register('/app' => app).
start
* Wee::Session: use #set_response, so that subclass of Wee::Session can more
easily modify a response (e.g. add cookies or HTTP headers).
Sat Jan 29 17:08:54 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Wee::LiteralMethodCallback and Component#call: Additional arguments
are now prepended instead of appended. Example:
call MessageBox.new('msg'), :confirm, 1
def confirm(one, msgbox_result)
end
* Added named callbacks. Example:
r.anchor.named_callback('test') { ... }
will use 'test' as callback_id instead of a generic one.
* Methods ImageTag#src_for and GenericTagBrush#css_class_for no more
prepend 'img.' or 'css.' in front of the property name.
* Refactored wee/renderer/html/brushes.rb. Removed InputCallbackMixin,
ActionCallbackMixin and ActionURLCallbackMixin modules. Instead the
GenericTagBrush has methods __input_callback, __action_callback etc.
which are aliased in the corresponding Brush classes. Also made the
SelectList callback marshallable.
Fri Jan 28 02:42:53 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Method Wee::WEBrickAdaptor.request_class added. This allows you to
use a custom request class for your application or even a different
one for each registered application. Also added cookie support.
* Added method Wee::Utils.autoreload_glob which is faster than
#autoreload as it does not traverse the whole LOAD_PATH.
* Wee::Response: added cookies
Fri Jan 28 02:32:30 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Removed method Wee::Session#current_page and replaced it by
#current_callbacks.
* Wee::Session no longer applies a snapshot if the snapshot equals the current
state of the components tree
* removed duplicate code from continuation/session.rb
Fri Jan 28 02:10:31 CET 2005 Michael Neumann <mneumann@ntecs.de>
* added 'wee' binary which generates a sample application and
recommended directory structure for you (similar to the 'rails' command).
Fri Jan 28 00:22:21 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Method Wee::Utils.app_for: Removed the id_seed option. Use id_gen
instead, which expects a IdGenerator object (default is now the much more
secure Md5IdGenerator).
* Wee::Request: Refactored a lot. Use =/ instead of @ as delimeter for
the request_handler_id/page_id part ('@' looks ugly in Konqueror, as
it is displayed as '%40')
* Wee::Application: Don't send a RedirectResponse when no
request_handler_id was given. This wasn't neccessary and would
break when introducing cookies.
Fri Jan 28 00:07:52 CET 2005 Michael Neumann <mneumann@ntecs.de>
* renamed wee/idgen.rb to wee/idgen/simple.rb and
wee/md5_idgen.rb to wee/idgen/md5.rb
Fri Jan 28 00:04:46 CET 2005 Michael Neumann <mneumann@ntecs.de>
* added Md5IdGenerator, removed method #current from SimpleIdGenerator
Thu Jan 27 18:45:44 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Implemented a new OgScaffolder, which now is more like Rails one.
Thu Jan 27 15:23:59 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Component#add_decoration returns now self. Example where this is
useful:
app = Wee::Utils.app_for {
HelloWorld.new.add_decoration(Wee::PageDecoration.new("Hello World"))
}
* add non-Rubygems way to install Wee: install.rb
--------------------------------------------------------------------
TAGGED 0.5.0
--------------------------------------------------------------------
Wed Jan 26 20:22:55 CET 2005 Michael Neumann <mneumann@ntecs.de>
* Raised version up to 0.5.0 (nearing a release)
* Fixed test cases.
Wed Jan 26 18:19:39 CET 2005 Michael Neumann <mneumann@ntecs.de>
* updated docs
* made Component#call's marshallable by using an object of class
Wee::Component::OnAnswer instead of a Proc.
* Moved all continuation-dependent code into directory
wee/continuation. By default Wee uses no continuations, you have to
require 'wee/continuation' to enable them.
Wed Jan 26 13:51:22 CET 2005 Michael Neumann <mneumann@ntecs.de>
* If you pass nil to an attribute method of a Brush, e.g.
r.table_data.width(nil)
This will remove the 'width' attribute from the tag.
* Method HtmlCanvas#javascript added:
# external javascript resource
r.javascript.src('/test.js')
# internal javascript
r.javascript.with('function js() { ... }')
* Method Presenter.uses_property added. Used to declare required
properties. This has actually no effect. It's sole purpose is to
describe the dependencies.
NO DATE AVAILABLE Michael Neumann <mneumann@ntecs.de>
* Enable Socket.do_not_reverse_lookup in WEBrickAdaptor by default, as
this has been the reason for much slowliness
* Method Component#add_child returns the child so that the following
code becomes possible:
@pager = add_child Pager.new(...)
* Added experimental property system.
* Added methods GenericTagBrush#onclick_callback, HtmlCanvas#link_css,
lots of refactoring
* New examples: hw.rb, live-update.rb, calculator.rb
* Wee::Brush::InputTag: methods #disabled and #readonly added
* Wee::Utils.app_for takes now (optionally) a block.
* Wee::MessageBox, Wee::WrapperDecoration, Wee::FromDecoration added
* Wee::Session#current_page, #current_context methods added
* added ground-work for live-updates (see examples/live-update.rb)
* added wee/databases/og.rb, which defines OgApplication and
OgSession, as well as a generic (but still very limited)
OgScaffolder.
* Methods Wee::Session#sleep and #awake added, which are called before and
after the request is handled. They can be used for example to setup
and release a database connection.
* Wee::Helper.app_for is now Wee::Utils.app_for
* require 'wee/utils' will load all utility methods.
Jump to Line
Something went wrong with that request. Please try again.