shway 3.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -34,7 +34,7 @@ end
34
34
  require 'rubygems'
35
35
  require 'echoe'
36
36
 
37
- Echoe.new('shway', '3.0') do |p|
37
+ Echoe.new('shway', '3.0.1') do |p|
38
38
  p.description = "Provides powerful UI programming with dynamic css and presenters.."
39
39
  p.project = 'shway'
40
40
  p.url = "http://rubyforge.org/projects/shway"
@@ -1,9 +1,6 @@
1
1
  #this should maybe be ShwayCssController or PublicController or something eventually.
2
2
  class ShwayController < ActionController::Base
3
3
 
4
- #pretty sure this isn't necessary any more.
5
- session :off
6
-
7
4
  helper Shway::Css::CssHelper
8
5
  helper Shway::Helpers::HtmlHelper
9
6
  helper Shway::Helpers::ShwayControllerHelper
@@ -2,7 +2,8 @@ class ShwayModelPresenter < ShwayPresenter
2
2
 
3
3
  def initialize(template, model, options={})
4
4
  super(template, options)
5
- model_name = self.class.name.chomp('Presenter').underscore # model_name = 'deployment'
5
+ #TODO NOTE: I'm NOT taking into account any custon model presenter name that might exist, I'm assuming they'll be named either FooPresenter or FooModelPresenter.
6
+ model_name = self.class.name.chomp('Presenter').chomp('Model').underscore # model_name = 'deployment'
6
7
  self.class.send :attr_accessor, model_name.intern # self.class.send :attr_accessor, :deployment
7
8
  self.send "#{model_name}=".intern, model # self.send "deployment=".itern, model
8
9
  end
@@ -120,7 +120,8 @@ class ShwayPresenter
120
120
  model_class, options = options, model_class if model_class.is_a? Hash
121
121
  model_class ||= options.delete :model_class
122
122
  #presenters for nil objects end up being cached with the model_class as their key
123
- presenter = model_presenters[model || model_class] ||= presenter_class_for(model || model_class).new(self, model, options)
123
+ presenter_class = options.delete(:presenter_class) || presenter_class_for(model || model_class)
124
+ presenter = model_presenters[model || model_class] ||= presenter_class.new(self, model, options)
124
125
  yield presenter if block
125
126
  presenter
126
127
  end
data/shway.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{shway}
5
- s.version = "3.0"
5
+ s.version = "3.0.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ryan Owens"]
9
- s.date = %q{2009-07-28}
9
+ s.date = %q{2009-07-31}
10
10
  s.description = %q{Provides powerful UI programming with dynamic css and presenters..}
11
11
  s.email = %q{ryan@infoether.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/rubygems/commands/shway_init_command.rb", "lib/rubygems_plugin.rb", "lib/shway/controllers/shway_controller.rb", "lib/shway/css/css_helper.rb", "lib/shway/css/css_parser.rb", "lib/shway/css/css_styles.rb", "lib/shway/extensions/routing_extensions.rb", "lib/shway/helpers/html_helper.rb", "lib/shway/helpers/shway_controller_helper.rb", "lib/shway/helpers/shway_helper.rb", "lib/shway/presenters/shway_model_presenter.rb", "lib/shway/presenters/shway_presenter.rb", "lib/shway/test/shway_test_helper.rb", "lib/shway.rb", "README"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shway
3
3
  version: !ruby/object:Gem::Version
4
- version: "3.0"
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Owens
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-28 00:00:00 -04:00
12
+ date: 2009-07-31 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15