jarrett-quarto 1.6.2 → 1.6.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.2
1
+ 1.6.3
@@ -87,6 +87,9 @@ module Quarto
87
87
  url = url_for(target)
88
88
  options = {:html_options => {}}.merge(options)
89
89
  output = "<a href=\"#{url}\""
90
+ if options.has_key?(:onclick)
91
+ options[:html_options][:onclick] ||= options[:onclick]
92
+ end
90
93
  options[:html_options].each do |attr, value|
91
94
  output << " #{attr}=\"#{value}\""
92
95
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{quarto}
5
- s.version = "1.6.2"
5
+ s.version = "1.6.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jarrett Colby"]
9
- s.date = %q{2009-06-23}
9
+ s.date = %q{2009-06-24}
10
10
  s.default_executable = %q{quarto}
11
11
  s.description = %q{Quarto is a Ruby framework for generating collections of documents from XML. It steps in where XSLT just won't cut it. Potential applications include web sites and e-books. It's built on top of ERB and REXML.}
12
12
  s.email = %q{jarrett@uchicago.edu}
@@ -76,6 +76,15 @@ describe Quarto::UrlHelper do
76
76
  :html_options => {:onclick => 'javascript:alert(\'foo\');'}
77
77
  ).should == expected
78
78
  end
79
+
80
+ it 'should treat :onclick as a member of :html_options' do
81
+ expected = '<a href="http://example.com" onclick="javascript:alert(\'foo\');">Click me</a>'
82
+ template = TemplateOutsideRails.new
83
+ template.link_to(
84
+ 'Click me', 'http://example.com',
85
+ :onclick => 'javascript:alert(\'foo\');'
86
+ ).should == expected
87
+ end
79
88
  end
80
89
 
81
90
  context 'in Rails' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jarrett-quarto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Colby
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-23 00:00:00 -07:00
12
+ date: 2009-06-24 00:00:00 -07:00
13
13
  default_executable: quarto
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency